package com.sky.task;

import com.sky.websocket.AdminSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class MyTask {
    @Autowired
    AdminSocket adminSocket;

//    @Scheduled(cron = "0/5 * * * * ?")
    public void show() {
        adminSocket.sendToAllClient(LocalDateTime.now() + "IOJAM");
    }
}
